package com.group.elmboot.service;

import com.group.elmboot.po.CreditTransaction;
import com.group.elmboot.po.RedPacket;
import com.group.elmboot.vo.CreditTransactionVO;

import java.util.List;

public interface CreditService {

    int earnCredit(CreditTransactionVO creditTransactionVO) throws Exception;
    int consumeCredit(CreditTransactionVO creditTransactionVO) throws Exception;
    int getCreditById(String userId);
    List<CreditTransaction> listCreditTransactionByPage(String userId, int current, int size);
    List<CreditTransaction> listCreditEarnTransactionByPage(String userId,int current,int size);
    List<CreditTransaction> listCreditConsumeTransactionByPage(String userId,int current,int size);

    List<RedPacket> listAvailableRedPackets(String userId, int current, int size);

    List<RedPacket> listAllRedPackets(String userId, int current, int size);

    List<RedPacket> listUsedRedPackets(String userId, int current, int size);

    int getAvailableRedPacketCategory(String userId);

    int redPacketUse(String userId, int amount,int orderId);
    List<RedPacket> listAllUsedRedPackets(String userId);
}
